import request_app from "../request_app.js";
import request from "../request";
/**
 *  本地生活点击商家获取详情
 * @param object data
 */
export const getMerInfoByid = (params) => {
  return request_app("localfife/getMerInfoByid", params, "get");
};

/** 本地生活点击活动获取详情 */
export const clickActivityInfoByid = (params) => {
  return request_app("localfife/clickActivityInfoByid", params, "get");
};
/** 本地生活点击立即抢购 */
export const selectTicketById = (params) => {
  return request_app("localfife/selectTicketById", params, "get");
};
/** 活动评价列表 */
export const appraiseList = (params) => {
  return request_app("localfife/appraiseList", params, "get");
};
/** 选择折扣方式小弹窗接口 */
export const discountMethod = (params) => {
  return request_app("localfife/discountMethod", params, "get");
};

/** 提交订单 */
export const submitOrder = (params) => {
  return request_app("localfife/submitOrder", params, "post");
};
/** 模仿订单支付 */
export const orderPay = (params) => {
  return request_app("localfife/orderPay", params, "get");
};
/** 本地生活订单支付接口 */
export const localLifePayment = (params) => {
  return request_app("pay/localLifePayment", params, "post");
};
/** 本地生活查看商券所关联商品详情 */
export const selectProductByTicketid = (params) => {
  return request_app("localfife/selectProductByTicketid", params, "get");
};
/** 本地生活订单列表 */
export const orderList = (params) => {
  return request_app("localfife/orderList", params, "get");
};
/** 邀请订单列表 */
export const orderRecordList = (params) => {
  return request_app("localfife/orderListByPromotion", params, "get");
};
/** 本地生活订单列表删除订单 */
export const delOrder = (params) => {
  return request_app("localfife/delOrder", params, "get");
};
/** 订单详情 */
export const orderInfoById = (params) => {
  return request_app("localfife/ebUserBillInfo", params, "get");
}; /** 快捷支付-选择折扣方式小弹窗接口 */
export const fastPaymentDiscountMethod = (params) => {
  return request_app("localfife/fastPaymentDiscountMethod", params, "get");
}; /** 快捷支付 */
export const fastPayment = (params) => {
  return request_app("localfife/fastPayment", params, "post");
};
/*
 * 积分记录
 * */
export const getIntegralList = (params) => {
  return request_app("integral/list", params, "get");
};
/*
 * 积分中心详情
 * */
export const postIntegralUser = (params) => {
  return request_app("integral/user", params, "get");
};
/**
 * 修改用户信息
 * @param object
 */
export const userEdit = (params) => {
  return request_app("user/edit", params, "post");
};
/*
 * 退出登录
 * */
export const getLogout = (params) => {
  return request_app("logout", params, "get");
};
/**
 * 退出登录
 */
export const logOutToken = (params) => {
  return request_app("delete/userToken", params, "post");
}; /** 待使用/代付款页面 */
export const toBeUsedOrPay = (params) => {
  return request_app("localfife/toBeUsedOrPay", params, "get");
};
/** 取消支付 */
export const orderCancel = (params) => {
  return request_app("localfife/orderCancel", params, "get");
};
/** 申请退款详情 */
export const requestRefund = (params) => {
  return request_app("localfife/requestRefund", params, "get");
};
/** 订单详情 已退款 退款中 退款成功 */
export const orderInfoRecord = (params) => {
  return request_app("localfife/orderInfoRecord", params, "get");
};
/**
 * 微信查询支付结果
 * @param object data
 */
export const wechatQueryPayResult = (params) => {
  return request_app("pay/queryPayResult?orderNo=" + params, "params", "get");
};

/** 获取用户房屋列表 */
export const userHouseList = (params) => {
  return request_app("propertyPayment/userHouseList", params, "get");
};
/** 小区管理-根据房屋id查询一系列 */
export const propertyMyHouseById = (data) => {
  return request_app("propertyMyHouse/getHouseListByGroup", data, "post");
};
/** 小区管理-绑定房产 */
export const bindHouse = (data) => {
  return request_app("propertyMyHouse/bindHouse", data, "post");
};
/** 小区管理-小区列表 */
export const comunityLists = (data) => {
  return request_app(`propertyMyHouse/comunityList?pageNum=${data.pageNum}&pageSize=${data.pageSize}`, data, "post");
};
/** 提交缴费 */
export const submitPayment = (data) => {
  return request_app("propertyPayment/submitPayment", data, "post");
};
/** 方案与付款 */
export const schemeAndPayment = (params) => {
  return request_app("propertyPayment/schemeAndPayment", params, "get");
};
/* 物业积分使用明细 */
export const wyjfList = (params) => {
  return request_app("system/consume/list", params, "get");
}
/** 退款原因 */
export const reasonRefundCause = (params) => {
  return request_app('localfife/reasonRefundCause', params, "get");
}
/** 申请退款提交 */
export const submitRequestRefund = (data) => {
  return request_app('localfife/submitRequestRefund', data, "post");
}
/** 申请退款提交 */
export const submitRequestRefundKj = (data) => {
  return request_app('localfife/submitRequestRefundKj', data, "post");
}
/**
 * 申请退款商品详情
 * @param object data
 */
export const applyRefund= (orderId) => {
  return request_app(`order/apply/refund/${orderId}`, {},  "get");
}

/**
 * 订单退款审核1
 * @param object data
 */
export const orderRefundVerify= (data) => {
  return request_app('order/refund', data,  "post");
}
/** 发布评论 */
export const submitAppraise= (data) => {
  return request_app('localfife/submitAppraise', data,  "post");
}
/* 商家邀请返利列表 */
export const getMerInviteList = (params) => {
  return request_app('system/merInviteUserIntegrainfo/list', params, "get");
};
/* 商家邀请返利列表汇总 */
export const getMerListSum = (params) => {
  return request_app('system/merInviteUserIntegrainfo/listSum', params, "get");
};
//商户查看邀请记录
export const getMerInviteUserList = (params) => {
  return request_app('system/merInviteUser/getMerInviteUserList', params, "get");
};
/* 申请提现记录 */
export const getWithdrawList = (params) => {
  return request_app('system/merInviteUserIntegraExchange/list', params, "get");
};
/* 提现功能 */
export const tixianYue = (data) => {
  return request_app('system/merInviteUserIntegraExchange', data, "post");
};
/* 本地生活团购定时计算时间请求后端 */
export const updateStatus = (params) => {
  return request_app('order/updateOrderStatus', params, "get");
};
/* 本地生活活动核销 */
export const orderVerification = (params) => {
  return request_app('localfife/orderVerification', params, 'get');
};
/* 查询用户首购 */
export const findUserFirst = (params) => {
  return request_app('order/findUserEgg', params, 'get');
};
/* 水卡信息添加 */
export const watercardAdd = (data) => {
  return request_app('watercard', data, 'post');
};
/* 水卡信息列表查询 */
export const watercardList = (params) => {
  return request_app('watercard/list', params, 'get');
};
/* 水卡地址列表查询 */
export const cardAddressList = (params) => {
  return request_app('system/dict/data/list', params, 'get');
};
/* 生成二维码 */
export function sharecodesss(data) {
  return request_app("system/comunityIntegralSharecode", data, "post");
}
/* 活动列表 */
export const ebMerActivityList = (params) => {
  return request_app('localfife/showeActivityList', params, 'get');
};
/* 首页配置查询 */
export const ebConfig = (params) => {
  return request_app('system/homepageconfig/list', params, 'get');
};
/* 首页配置列表 */
export const ebConfigList = (params) => {
  return request_app('system/homepageconfigInfo/list', params, 'get');
};
/* 优惠券列表 */
export const ebCouponList = (params) => {
  return request_app('coupon/front/coupons', params, 'get');
};
/* 优惠券领取 */
export const ebCouponReceive = (data) => {
  return request_app('coupon/front/receive?couponId=' + data.couponId + '&uid=' + data.uid, data, 'post');
};